@extends('admin.layout.index')

@section('content')
    
    <div class="portlet-body">

        <div id="sample_2_wrapper" class="dataTables_wrapper form-inline" role="grid">
           
     <table class="table table-striped table-bordered table-hover table-full-width dataTable" id="sample_2" aria-describedby="sample_2_info">

        <thead>

            <tr role="row">

                <th class="sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="Rendering engine: activate to sort column ascending" style="width: 192px;">ID</th>

                <th class="sorting_asc" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Browser: activate to sort column descending" style="width: 261px;">分类名称</th>

                <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 239px;">父类ID</th>

                <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending" style="width: 165px;">分类路径</th>

                <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending" style="width: 119px;">状态</th>

                <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_2" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending" style="width: 119px;">操作</th>

            </tr>

        </thead>

        

    <tbody role="alert" aria-live="polite" aria-relevant="all">

        @foreach($data as $k=>$v)
        <tr class="odd">

                <td class=" ">{{$v['id']}}</td>

                <td class="  sorting_1">{{$v['name']}}</td>

                <td class="hidden-480 ">{{$v['pid']}}</td>

                <td class="hidden-480 ">{{$v['path']}}</td>

                <td class="hidden-480 ">
                    

                    <a href="/cate/edit/{{$v['id']}}"><i class="icon-cogs">{{$v['status'] == 0 ? '启  用' : '禁  用'}}</i></a>
                    

                </td>

                <td class="hidden-480 ">

                    <a href="/cate/delete/{{$v['id']}}">删除</a>
                    <a href="/cate/add/{{$v['id']}}">添加子分类</a>

                </td>
            @endforeach
        </tr>

    </tbody>
    </table>
    </div>

</div>
@endsection